Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the way the library uses to detect WSL to detect only WSL v1 #199

Closed
wants to merge 2 commits into from

Conversation

urubatan
Copy link

Uses the kernel version to detect if the current kernel version is V1 or V2

This is the correct implementation for #196 and all the description there applies here

Fixes #192 and #197

This PR #187 changed WSL detection to detect both WSLv1 and WSLv2 as running in WSL and use Chrome on Windows for both versions. But it doesn't work on WSLv2 out of the box.

WSL2 networking is different from WSL1 and you can't connect from the WSL2 Linux on Chromedriver running on Windows using 127.0.0.1:9515, see: microsoft/WSL#4619

This PR changes the wsl detection to be explicity about v1 and only uses Chromedriver on Windows if it is WSLv1, as it doesn't work on WSLv2.

Rodrigo Urubatan added 2 commits January 13, 2021 17:38
@urubatan
Copy link
Author

@titusfortner I also added tests to check if it wont identify WSL2 by mistake

@kapoorlakshya
Copy link
Collaborator

Closing at user's request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't find Chrome Binary in WSL2 with version 4.4.2
2 participants